"""
深浅拷贝
深拷贝 顶级对象和嵌套对象都会复制，顶级对象和嵌套对象值修改 复制后的对象不受影响
浅拷贝 顶级对象和嵌套对象都会复制，顶级对象和嵌套对象值修改  复制后的对象的嵌套对象会修改，顶级对象不修改
"""
import copy

a = [1, 2, 3, 4, [5, 6, 7]]
b = a
print(id(a))
print(id(b))
d = copy.copy(a)
print("d这是个浅copy", id(d))
print("d这是个浅copy", d)
c = copy.deepcopy(a)
print("c这是个深copy", id(c))
print("c这是个深copy", c)
print("====a.append(8)====")
a.append(8)
a[4].append(9)
print("a:", a)
print("b:", b)
print("c:", c)
print("d:", d)
